package com.smart.manager.system.entities.body;

import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.system.entities.enums.LoginResult;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * systemLog模型
 *
 * @author xiaxuqiu
 * @date 2023/03/26
 */
public class RLogLogin {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RLogLogin1")
    public static class SearchBody extends BaseSearch {


        @ApiModelProperty("登录账号")
        private String account;


        @ApiModelProperty("客户端IP")
        private String ip;

        @ApiModelProperty("日期段")
        private String dateRange ;


    }


    @Data
    @ApiModel("RLogLogin2")
    public static class EditBody  implements Serializable {

        /**
         * 角色代码
         */

        @ApiModelProperty("登录账号")
        @Length(max= 30,message="登录账号 不能超过30个字符")
        @NotBlank(message = " 登录账号  不能为空")
        private String account;


        @ApiModelProperty("客户端IP")
        @Length(max= 30,message="客户端IP 不能超过20个字符")
        @NotBlank(message = " 客户端IP  不能为空")
        private String ip;


        @ApiModelProperty("请求客户端操作系统")
        private String os;

        @ApiModelProperty("请求浏览器")
        private String browser;

        @ApiModelProperty("登录结果")
        private LoginResult result;

        @ApiModelProperty("登录时间")
        private LocalDateTime loginTime;

        @ApiModelProperty("模块描述")
        private String description;


    }


}
